package com.gxc.oauth2.controller;

import com.gxc.oauth2.entity.TbContentEntity;
import com.gxc.oauth2.service.ContentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author GongXincheng
 * @since 2019-10-12 00:03
 */
@RestController
public class ContentController {

    @Resource
    private ContentService contentService;

    @GetMapping("/hello")
    public String hello() {
        return "Hello World";
    }

    @GetMapping("/")
    public List<TbContentEntity> findAll() {
        return contentService.findAll();
    }

}
